From ebed7292660ed2caeb4cadaf6c0031a91914f522 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 11 Dec 2003 18:39:03 +0000 Subject: [PATCH] Put the illegal char check down below again, to fix breakage to # links --- includes/Title.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/includes/Title.php b/includes/Title.php index 3639be9210..d0300ed4cc 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -401,12 +401,6 @@ class Title { $this->mInterwiki = $this->mFragment = ""; $this->mNamespace = 0; - # Reject illegal characters. - # - if( preg_match( $rxTc, $this->mDbkeyform ) ) { - return false; - } - # Clean up whitespace # $t = preg_replace( "/[\\s_]+/", "_", $this->mDbkeyform ); @@ -464,8 +458,13 @@ class Title { $r = substr( $r, 0, strlen( $r ) - strlen( $f ) ); } - $t = $r; - if( $this->mInterwiki == "") $t = $wgLang->ucfirst( $t ); + # Reject illegal characters. + # + if( preg_match( $rxTc, $r ) ) { + return false; + } + + if( $this->mInterwiki == "") $t = $wgLang->ucfirst( $r ); $this->mDbkeyform = $t; $this->mUrlform = wfUrlencode( $t ); $this->mTextform = str_replace( "_", " ", $t ); -- 2.20.1